package com.tom.ssm.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.tom.ssm.entity.User;
import com.tom.ssm.service.UserService;

@Controller
public class TestController {

	@Autowired
	private UserService userService;
	
	@RequestMapping(value = "test")
	public String test(Model model){
		List<User> users = userService.getUserList(0, 100);
		for (User user : users) {
			System.out.println(user);
			System.out.println("--------------------");
		}
		model.addAttribute("hello", "Hello World!");
		return "test";
	}
}
